<HTML><HEAD><TITLE>?Result tent_is +Expr</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(tentative)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>?Result tent_is +Expr</H1>
Maintain tentative result of arithmetic expression
<DL>
<DT><EM>Result</EM></DT>
<DD>A (free or tentative) variable
</DD>
<DT><EM>Expr</EM></DT>
<DD>Arithmetic expression containing tentative variables
</DD>
</DL>
<H2>Description</H2>

	<P>
	Implementation of arithemtic invariants.
	</P><P>
	This is similar to the normal arithmetic is/2 predicate, but
	evaluates the expression based on the tentative values of its
	variables.  The result is delivered as (an update to) the
	tentative value of the Result variable.  Once initiated,
	tent_is will stay active and keep updating Result's tentative
	value eagerly whenever the tentative value of any variable in
	Expression changes.
	</P>
    
<H3>Modes and Determinism</H3><UL>
<LI>tent_is(+, ?) is det
</UL>
<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H2>Examples</H2>
<PRE>
    ?- [X, Y] tent_set [3, 4], Z tent_is X + Y.
    X = X{3 -&gt; 0}
    Y = Y{4 -&gt; 0}
    Z = Z{7 -&gt; 0}
    Yes (0.00s cpu)

    ?- [X, Y] tent_set [3, 4], Z tent_is X + Y, X tent_set 7.
    X = X{7 -&gt; 0}
    Y = Y{4 -&gt; 0}
    Z = Z{11 -&gt; 0}
    Yes (0.00s cpu)
    </PRE>
<H2>See Also</H2>
<A HREF="../../lib/tentative/tent_set-2.html">tent_set / 2</A>, <A HREF="../../lib/tentative/tent_get-2.html">tent_get / 2</A>
</BODY></HTML>
